<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */
use Hyperf\HttpServer\Router\Router;


Router::addRoute(['GET', 'POST', 'HEAD'], '/', 'App\Controller\IndexController@index');

Router::get('/favicon.ico', function () {
    return '';
});
Router::addGroup(
    '', function () {
    //首页
    Router::addRoute(['GET'], '/home/index', 'App\Controller\HomeController@index');//首页
    //tag
    Router::addRoute(['GET'], '/home/tag', 'App\Controller\HomeController@tag');//list Tag
    //list
    Router::addRoute(['POST'], '/home/list', 'App\Controller\HomeController@list');//list
    //详情
    Router::addRoute(['GET'], '/home/episodes/{id:\d+}', 'App\Controller\HomeController@episodes'); //详情
    //登录
    Router::addRoute(['POST'], '/home/login', 'App\Controller\HomeController@login'); //登录
    //提交订单
    Router::addRoute(['POST'], '/home/order', 'App\Controller\HomeController@order'); //提交订单
    //orderList
    Router::addRoute(['GET'], '/home/orderlist', 'App\Controller\HomeController@orderList'); //提交订单

}, ['middleware' => [\App\Middleware\ValidateMiddleware::class]]);
